<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@include file="/resources/common/commonTaglibs.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<!-- 导入资源文件 -->
<%@include file="/resources/common/commonJs.jsp" %>
<%@include file="/resources/common/commonCss.jsp" %>
<title>校车时刻表添加</title>
<style type="text/css">
.addTable{
	line-height: 30px;
	border:solid 1px #cbcbcb; /* 设置边框属性；样式(solid=实线)、颜色(#999=灰) */
	text-align: center;
}
.addTable td{
	border:solid 1px #cbcbcb;
	text-align: center;
	letter-spacing:2px;
	width: 10%;
}
</style>
<script type="text/javascript">
function saveBusSchedule() {
	if (!getSubmitFlag($('#busScheduleForm'))) {
		layer.alert('请先验证填写的字段');
		return false;
	}
	$('#busScheduleForm').submit();
}

$(function() {
	$(".form-date").datetimepicker({
	    language:  "zh-CN",
	    weekStart: 1,
	    todayBtn:  1,
	    autoclose: 1,
	    todayHighlight: 1,
	    startView: 1,
	    minView: 0,
	    maxView: 1,
	    minuteStep: 5,
	    forceParse: 0,
	    format: 'hh:ii'
	});
	//添加判断
	$('select[name="endStation"]').on('change', function() {
		//获取始发站
		var startStation = $('select[name="startStation"]');
		if (startStation == $(this).val()) {
			
		}
	});
	$("input").blur(function() {
		validateInput(this);
	});
})
</script>
</head>
<body>
<div align="center" style="margin: 20px 1% 0 1% ">
<form action="${path }/busSchedule/busScheduleSave" method="post" id="busScheduleForm">
<table  cellpadding="0" cellspacing="0"  align="center" class="addTable" style="text-align:center">
	<tr><td colspan="4" align="center">校车时刻添加</td></tr>
	<tr>
		<td>始发站：</td>
		<td><select name="startStation" class="form-control">		
			<option value="1">金花校区</option>
			<option value="2">临潼校区</option> 
			</select>
		</td>
		<td>终点站：</td>
		<td><select name="endStation" class="form-control">		
			<option value="1">金花校区</option>
			<option value="2">临潼校区</option> 
			</select>
		</td>	
	</tr>
	<tr>
		<td>出发时间：</td>
		<td><input name="startTime" type="text" class="form-control form-date" data-validate="required"/></td>
		<td>到达时间：</td>
		<td><input name="endTime" type="text" class="form-control form-date" data-validate="required"/></td>
	</tr>
	<tr>
		<td>车次编号：</td>
		<td colspan="3"><input name="scheduleNo" type="text" class="form-control" data-validate="required" placeholder="* 该编号作为校车乘坐人员预约额度辨认标识"/></td>
	</tr>
	 <tr>
		<td colspan="4">
		<input type="button" value="保存" class="btn btn-primary" onclick="saveBusSchedule()"/>
		<input type="reset" value="重置" class="btn"/>
		</td>
	</tr>
</table>
</form>
</div>
</body>
</html>